package com.expressway.controller;


import com.expressway.common.lang.Result;
import com.expressway.entity.Menu;
import com.expressway.service.MenuService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author liuyu
 * @since 2021-05-06
 */
@RestController
@RequestMapping("/menu")
public class MenuController {

    @Autowired
    MenuService menuService;

    @GetMapping("/menulist")
    public Result MenuList(){
        List<Menu> menuList = menuService.list();
        return Result.succ(menuList);
    }
}
